package org.example.ch2;

import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.core.Observable;

import java.util.ArrayList;
import java.util.Collections;

public class Main6 {
    public static void main(String[] args) {

        ArrayList list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            list.add(i);
        }

//        Observable<Object> objectObservable = Observable.fromIterable(Collections.emptyList());
        Observable<Object> objectObservable = Observable.fromIterable(list);
        objectObservable.subscribe(
                System.out::println,
                System.err::println
        );

    }
}
